package com.leps.nq.op.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.leps.nq.common.vo.PageVo;
import com.leps.nq.op.entity.OpMonthlyTask;
import com.leps.nq.op.vo.MonthlyTaskQueryModel;

/**
 * <p>
 * 月度任务表 服务类
 * </p>
 *
 * @author hex
 * @since 2022-05-22
 */
public interface IOpMonthlyTaskService extends IService<OpMonthlyTask> {

    PageVo<OpMonthlyTask> pageByQueryModel(MonthlyTaskQueryModel queryModel);

    OpMonthlyTask getByYearAndMonth(int year, int month);

    /**
     * 增量方式更新月度任务完成量
     * @param germicideDosage
     * @param crrosionInhibitorDosage
     * @param year
     * @param month
     * @return
     */
    boolean updateCompletionByIncrement(Double germicideDosage, Double crrosionInhibitorDosage, Integer year, Integer month, Integer teamId);

    boolean updateCompletionByTeamIdAndYearMonth(Integer teamId, Integer year, Integer month);

    void updateCompletionAfterImportExcel();
}
